3.3.96 \(\int \frac {1}{\sqrt {e \csc (c+d x)} (a+a \sec (c+d x))} \, dx\) [296]

Optimal. Leaf size=99 \[ \frac {2 \cot (c+d x)}{a d \sqrt {e \csc (c+d x)}}-\frac {2 \csc (c+d x)}{a d \sqrt {e \csc (c+d x)}}+\frac {4 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{a d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}} \]

[Out]

2*cot(d*x+c)/a/d/(e*csc(d*x+c))^(1/2)-2*csc(d*x+c)/a/d/(e*csc(d*x+c))^(1/2)-4*(sin(1/2*c+1/4*Pi+1/2*d*x)^2)^(1
/2)/sin(1/2*c+1/4*Pi+1/2*d*x)*EllipticE(cos(1/2*c+1/4*Pi+1/2*d*x),2^(1/2))/a/d/(e*csc(d*x+c))^(1/2)/sin(d*x+c)
^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.16, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3963, 3957, 2918, 2644, 30, 2647, 2719} \begin {gather*} -\frac {2 \csc (c+d x)}{a d \sqrt {e \csc (c+d x)}}+\frac {2 \cot (c+d x)}{a d \sqrt {e \csc (c+d x)}}+\frac {4 E\left (\left .\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )\right |2\right )}{a d \sqrt {\sin (c+d x)} \sqrt {e \csc (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[e*Csc[c + d*x]]*(a + a*Sec[c + d*x])),x]

[Out]

(2*Cot[c + d*x])/(a*d*Sqrt[e*Csc[c + d*x]]) - (2*Csc[c + d*x])/(a*d*Sqrt[e*Csc[c + d*x]]) + (4*EllipticE[(c -
Pi/2 + d*x)/2, 2])/(a*d*Sqrt[e*Csc[c + d*x]]*Sqrt[Sin[c + d*x]])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2644

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2647

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(a*Cos[e +
f*x])^(m - 1)*((b*Sin[e + f*x])^(n + 1)/(b*f*(n + 1))), x] + Dist[a^2*((m - 1)/(b^2*(n + 1))), Int[(a*Cos[e +
f*x])^(m - 2)*(b*Sin[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, e, f}, x] && GtQ[m, 1] && LtQ[n, -1] && (Intege
rsQ[2*m, 2*n] || EqQ[m + n, 0])

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 2918

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 3963

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*((g_.)*sec[(e_.) + (f_.)*(x_)])^(p_), x_Symbol] :> Dist[g^Int
Part[p]*(g*Sec[e + f*x])^FracPart[p]*Cos[e + f*x]^FracPart[p], Int[(a + b*Csc[e + f*x])^m/Cos[e + f*x]^p, x],
x] /; FreeQ[{a, b, e, f, g, m, p}, x] &&  !IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {e \csc (c+d x)} (a+a \sec (c+d x))} \, dx &=\frac {\int \frac {\sqrt {\sin (c+d x)}}{a+a \sec (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}\\ &=-\frac {\int \frac {\cos (c+d x) \sqrt {\sin (c+d x)}}{-a-a \cos (c+d x)} \, dx}{\sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}\\ &=\frac {\int \frac {\cos (c+d x)}{\sin ^{\frac {3}{2}}(c+d x)} \, dx}{a \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}-\frac {\int \frac {\cos ^2(c+d x)}{\sin ^{\frac {3}{2}}(c+d x)} \, dx}{a \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}\\ &=\frac {2 \cot (c+d x)}{a d \sqrt {e \csc (c+d x)}}+\frac {2 \int \sqrt {\sin (c+d x)} \, dx}{a \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}+\frac {\text {Subst}\left (\int \frac {1}{x^{3/2}} \, dx,x,\sin (c+d x)\right )}{a d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}\\ &=\frac {2 \cot (c+d x)}{a d \sqrt {e \csc (c+d x)}}-\frac {2 \csc (c+d x)}{a d \sqrt {e \csc (c+d x)}}+\frac {4 E\left (\left .\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )\right |2\right )}{a d \sqrt {e \csc (c+d x)} \sqrt {\sin (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 0.42, size = 95, normalized size = 0.96 \begin {gather*} \frac {6 (2 i+\cot (c+d x)-\csc (c+d x))-4 \sqrt {1-e^{2 i (c+d x)}} (i+\cot (c+d x)) \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};e^{2 i (c+d x)}\right )}{3 a d \sqrt {e \csc (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[e*Csc[c + d*x]]*(a + a*Sec[c + d*x])),x]

[Out]

(6*(2*I + Cot[c + d*x] - Csc[c + d*x]) - 4*Sqrt[1 - E^((2*I)*(c + d*x))]*(I + Cot[c + d*x])*Hypergeometric2F1[
1/2, 3/4, 7/4, E^((2*I)*(c + d*x))])/(3*a*d*Sqrt[e*Csc[c + d*x]])

________________________________________________________________________________________

Maple [C] Result contains complex when optimal does not.
time = 0.17, size = 536, normalized size = 5.41

method result size
default \(-\frac {\left (4 \cos \left (d x +c \right ) \sqrt {-\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {i \cos \left (d x +c \right )-\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \EllipticE \left (\sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right )-2 \cos \left (d x +c \right ) \sqrt {-\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {i \cos \left (d x +c \right )-\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \EllipticF \left (\sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right )+4 \sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {i \cos \left (d x +c \right )-\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \EllipticE \left (\sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right ) \sqrt {-\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}}-2 \sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {i \cos \left (d x +c \right )-\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}\, \EllipticF \left (\sqrt {\frac {i \cos \left (d x +c \right )+\sin \left (d x +c \right )-i}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right ) \sqrt {-\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}}+\sqrt {2}\, \cos \left (d x +c \right )-\sqrt {2}\right ) \sqrt {2}}{a d \sqrt {\frac {e}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right )}\) \(536\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sec(d*x+c))/(e*csc(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/a/d*(4*cos(d*x+c)*(-I*(-1+cos(d*x+c))/sin(d*x+c))^(1/2)*((I*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2)*(-(I
*cos(d*x+c)-sin(d*x+c)-I)/sin(d*x+c))^(1/2)*EllipticE(((I*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2),1/2*2^(1/
2))-2*cos(d*x+c)*(-I*(-1+cos(d*x+c))/sin(d*x+c))^(1/2)*((I*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2)*(-(I*cos
(d*x+c)-sin(d*x+c)-I)/sin(d*x+c))^(1/2)*EllipticF(((I*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2),1/2*2^(1/2))+
4*((I*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2)*(-(I*cos(d*x+c)-sin(d*x+c)-I)/sin(d*x+c))^(1/2)*EllipticE(((I
*cos(d*x+c)+sin(d*x+c)-I)/sin(d*x+c))^(1/2),1/2*2^(1/2))*(-I*(-1+cos(d*x+c))/sin(d*x+c))^(1/2)-2*((I*cos(d*x+c
)+sin(d*x+c)-I)/sin(d*x+c))^(1/2)*(-(I*cos(d*x+c)-sin(d*x+c)-I)/sin(d*x+c))^(1/2)*EllipticF(((I*cos(d*x+c)+sin
(d*x+c)-I)/sin(d*x+c))^(1/2),1/2*2^(1/2))*(-I*(-1+cos(d*x+c))/sin(d*x+c))^(1/2)+2^(1/2)*cos(d*x+c)-2^(1/2))/(e
/sin(d*x+c))^(1/2)/sin(d*x+c)*2^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c))/(e*csc(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

e^(-1/2)*integrate(1/((a*sec(d*x + c) + a)*sqrt(csc(d*x + c))), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.88, size = 78, normalized size = 0.79 \begin {gather*} \frac {2 \, {\left (\sqrt {2 i} {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + \sqrt {-2 i} {\rm weierstrassZeta}\left (4, 0, {\rm weierstrassPInverse}\left (4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \frac {\cos \left (d x + c\right ) - 1}{\sqrt {\sin \left (d x + c\right )}}\right )} e^{\left (-\frac {1}{2}\right )}}{a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c))/(e*csc(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

2*(sqrt(2*I)*weierstrassZeta(4, 0, weierstrassPInverse(4, 0, cos(d*x + c) + I*sin(d*x + c))) + sqrt(-2*I)*weie
rstrassZeta(4, 0, weierstrassPInverse(4, 0, cos(d*x + c) - I*sin(d*x + c))) + (cos(d*x + c) - 1)/sqrt(sin(d*x
+ c)))*e^(-1/2)/(a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\sqrt {e \csc {\left (c + d x \right )}} \sec {\left (c + d x \right )} + \sqrt {e \csc {\left (c + d x \right )}}}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c))/(e*csc(d*x+c))**(1/2),x)

[Out]

Integral(1/(sqrt(e*csc(c + d*x))*sec(c + d*x) + sqrt(e*csc(c + d*x))), x)/a

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c))/(e*csc(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(1/(sqrt(e*csc(d*x + c))*(a*sec(d*x + c) + a)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\cos \left (c+d\,x\right )}{a\,\sqrt {\frac {e}{\sin \left (c+d\,x\right )}}\,\left (\cos \left (c+d\,x\right )+1\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a/cos(c + d*x))*(e/sin(c + d*x))^(1/2)),x)

[Out]

int(cos(c + d*x)/(a*(e/sin(c + d*x))^(1/2)*(cos(c + d*x) + 1)), x)

________________________________________________________________________________________